package leetcode_2401_2500;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class LeeCode_2451 {
    public static void main(String[] args) {

    }
    private static String oddString(String[] words) {
        Map<String, int[]> map = new HashMap<>();
        int j = 0;
        for (String word : words) {
            StringBuilder key = new StringBuilder();
            for (int i = 1; i < word.length(); i++) {
                key.append(word.charAt(i) - word.charAt(i - 1)).append(",");
            }
            String k = key.toString();
            if (map.containsKey(k)){
                map.get(k)[0]++;
            }else {
                map.put(k, new int[]{1, j});
            }
            j++;
        }
        for (String key : map.keySet()) {
            if (map.get(key)[0] == 1)
                return words[map.get(key)[1]];
        }
        return "";
    }
}
